import 'osc_blog.dart';
import 'osc_notice.dart';

class OscNewsListEntity {
	List<OscBlog> newsList;
	OscNotice notice;

	OscNewsListEntity({this.newsList, this.notice});

	OscNewsListEntity.fromJson(Map<String, dynamic> json) {
		if (json['newslist'] != null) {
			newsList = new List<OscBlog>();(json['newslist'] as List).forEach((v) { newsList.add(new OscBlog.fromJson(v)); });
		}
		notice = json['notice'] != null ? new OscNotice.fromJson(json['notice']) : null;
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		if (this.newsList != null) {
      data['newslist'] =  this.newsList.map((v) => v.toJson()).toList();
    }
		if (this.notice != null) {
      data['notice'] = this.notice.toJson();
    }
		return data;
	}
}
